<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    
    <body>
        
        <ui:composition template="./Template.xhtml">
            
            <ui:define name="content">
                <h1 align="center">Order List</h1>
                <h:form>
                    <p:dataTable value="#{orderBean.orderList}" var="order"
                                 rows="5" paginator="true" >
                        <p:column headerText="ID" sortBy="#{order.id}"
                                  filterBy="#{order.id}" filterMatchMode="exact">
                            <h:outputLabel value="#{order.id}"/>
                        </p:column>
                        <p:column headerText="Customer" sortBy="#{order.customer}"
                                  filterBy="#{order.customer}" filterMatchMode="contains">
                            <h:outputLabel value="#{order.customer}"/>
                        </p:column>
                        <p:column headerText="Product" sortBy="#{order.product}"
                                  filterBy="#{order.product}" filterMatchMode="contains">
                            <h:outputLabel value="#{order.product}"/>
                        </p:column>
                        <p:column headerText="RequiredDate" sortBy="#{order.requiredDate}"
                                  filterBy="#{order.requiredDateString}" filterMatchMode="contains">
                            <h:outputLabel value="#{order.requiredDateString}"/>
                        </p:column>
                    </p:dataTable>
                </h:form>
            </ui:define>

        </ui:composition>
        
    </body>
</html>
